<?php
include_once 'config.php';

function query_win($par_win) {
	
	ncurses_getmaxyx($par_win, $par_win_rows, $par_win_cols);
	ncurses_getyx($par_win, $par_win_y, $par_win_x);
	
	$q_win_rows = $par_win_rows - 2;
	$q_win_cols = $par_win_cols;
	
	$q_win_y = $par_win_y + 4;
	$q_win_x = (($par_win_cols - $q_win_cols) >> 1 );
	
	$q_win = ncurses_newwin($q_win_rows, $q_win_cols, $q_win_y, $q_win_x);
	ncurses_wborder($q_win, 0,0, 0,0, 0,0, 0,0);
	ncurses_mvwaddstr($q_win, 1, 3, "this is query win");
	
	
	ncurses_mvwaddstr($par_win, 0, 30, "query::");
	
	ncurses_wrefresh($q_win);
	ncurses_wmove($q_win, 0, 50);
	
	$q_loop = 1;
	while ($q_loop) {
		
		$key = ncurses_wgetch($q_win);
		switch ($key) {
			case 1:
			;
			break;
			
			case MY_NCURSES_KEY_ESC:
				return 1;
			break;
		}
		
		;
	}
	
	
	
//	ncurses_mvwaddstr
	
}
?>